<?php
session_start();
include_once 'recursos/config.php';
    $cfg = new configuracion();
    
$dominio = $cfg->getG2uDominio()."/";
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title> :: Gift 2 You :: <?=$_SESSION["g2uUserName"]?></title>
        
        <link rel="shortcut icon" type="image/ico" href="images/vineta-globo.png" />
        <link type="text/css" href="css/g2u.css" rel="stylesheet"  media="screen" />
        <link type="text/css" href="css/tipsy.css" rel="stylesheet"  media="screen" />
        
        <link type="text/css" href="css/events.css" rel="stylesheet"  media="screen" />
        
        <!--SCROLL-->
        <link type="text/css" href="css/jquery.mCustomScrollbar.css" rel="stylesheet"  media="screen" />

        <link type="text/css" href="css/jquery-ui.css" rel="stylesheet"  media="screen" />

        <script lang="javascript" type="text/javascript" src="js/jquery-1.9.1.js"></script>
        <script lang="javascript" type="text/javascript" src="js/g2u.js"></script>
        <script lang="javascript" type="text/javascript" src="js/tipsy.js"></script>

        <script lang="javascript" type="text/javascript" src="js/jquery-ui.js"></script>
        <script lang="javascript" type="text/javascript" src="js/events.js"></script>
        
        <!-- SCROLL -->
        <script lang="javascript" type="text/javascript" src="js/jquery.mCustomScrollbar.js"></script>
        
    </head>
    <body>
        <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; border-color: lightgray;" border="0">
            <tr>
                <td style="width: 20%; vertical-align: top;  ">
                    <div>
                        <center>
                            <img src="images/logo.png"/>
                        </center>
                    </div>

                    <div>
                        <center>
                            <img id="ppicPortal" src="<?=$_SESSION["g2uProfilePic"]?>" />
                            <img src="images/png/salir.png" style="cursor: pointer;" onclick="logOut();"  width="18px" />
                            <br/>        
                            <?=$_SESSION["g2uFirstName"]?>
                        </center>
                    </div>
                    
                    <div id="menu">
                        <? include_once 'menu.php'; ?>
                    </div>
                    
                </td>
                <td style="width: 80%; vertical-align: top; padding-right: 50px; " >
                    
                    <div id="contentBody">
                        
                        <div id="eventHead">
                            Eventos
                        </div>
                        
                        <div id="eventBody">
                            <div id="eventInnerBody" >

                                <table  style=" width: 100%">
                                    <tr>
                                        <td width="65%" style="vertical-align: top;">
                                            <div id="event_list" style="height: 450px; overflow: auto;" >
                                            <? include_once 'vista/vista.event_list.php'; ?>
                                            </div>
                                        </td>
                                        <td style="vertical-align: top;">
                                            <br/><br/>
                                            <center>
                                                <img id="newEvent" src="<?=$dominio?>images/png/crear_evento.png" />
                                            </center>
                                        </td>
                                    </tr>
                                </table>
                       
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        
        <div id="event_new" style="display:none">
            <div class="event_wrp" id="event_wrp"></div>
        </div>
    <script type="text/javascript">
        $(window).ready(function(){
            $("#event_list").mCustomScrollbar({
                theme:"dark"
            });
            
            $("div.event_wrap").click(function(){
                window.location.href = "<?=$dominio?>evento/"+$(this).attr("id")+"/"+$(this).attr("rel");
            })
            
        });
    </script>
        
    </body>
</html>